<?php 
if(!isset($_SESSION)) 
{ 
session_start(); 
}  
include '../../operations/connection.php';
$newlang = $_REQUEST['newlang'];

if ($_REQUEST['newlang'] == "EN") {
	include "../../value/value_en.php";
} else if($_REQUEST['newlang'] == "VN") {
	include "../../value/value_vn.php";
}
else {
	include "../../value/value_kr.php";
}

if(isset($_REQUEST['db']) && isset($_REQUEST['domain']) && isset($_REQUEST['pname'])){
	$tb="";
	
	$query="SELECT ac_eli_manager.DatabaseName from ac_eli_manager where trim(ac_eli_manager.DatabaseName)=trim('".$_REQUEST['db']."')";
	$m1=mysql_query($query);
	if(mysql_num_rows($m1)>0){
		$tb .="$l_databaseexist";
	}
	
	$query2="SELECT ac_eli_manager.KeyName from ac_eli_manager where trim(ac_eli_manager.KeyName)=trim('".$_REQUEST['domain']."')";
	$m2=mysql_query($query2);
	if(mysql_num_rows($m2)>0){
		if($tb==""){
			$tb ="$l_keydomainexist";
		}else{
			$tb .=" -- $l_keydomainexist";
		}
	}
	
	$query1="select ac_eli_manager.PartnerName from ac_eli_manager where trim(ac_eli_manager.PartnerName)=trim('".$_REQUEST['pname']."')";
	$m21=mysql_query($query1);
	if(mysql_num_rows($m21)>0){
		if($tb==""){
			$tb ="trungten";
		}else{
			$tb .=" -- trungten";
		}
	}
	
	if($tb==""){
		$_SESSION['checkdb_domain']="okk";
	}else{
		$_SESSION['checkdb_domain']=$tb;
	}
	
}
?>
<input type="hidden" id="viewcheckdb_domain" value="<?php echo $_SESSION['checkdb_domain'];?>" />

<?php 
//echo $query."<br>".$query2;
mysql_close($connection);
?>